<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/forum_main.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:47 GMT -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>H+ 后台主题UI框架 - 论坛</title>
    <link href="${pageContext.request.contextPath}/static/hplus/css/bootstrap.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/hplus/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/hplus/css/font-awesome.min93e3.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/hplus/css/animate.min.css" rel="stylesheet">
    <link href="${pageContext.request.contextPath}/static/hplus/css/style.min862f.css" rel="stylesheet">

    <%--  <script type="text/javascript" sr     c="${pageContext.request.contextPath}/static/bootstrap/jquery-3.2.1.min.js"></script>
      <script type="text/javascript" src="${pageContext.request.contextPath}/static/bootstrap/js/bootstrap.js"></script>--%>
    <script src="${pageContext.request.contextPath}/static/hplus/js/jquery.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/hplus/js/bootstrap.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/hplus/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="${pageContext.request.contextPath}/static/hplus/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

    <script>
        $(function () {
            $.post("${pageContext.request.contextPath}/vip/cha",function (data) {
                var _this111 = $("#520");
                $(_this111).empty();
                /*$(_this).append("<tr>"+"<td>"+单号+"</td>"+"<td>"+时间+"</td>"+"<td>"+供货商+"</td>"+"<td>"+经办人+"</td>"+"<td>"+总价+"</td>"+"<tr>");*/
                for (var i=0 ;i < data.length;i++) {

                    $(_this111).append("<div class=\"col-sm-9\" style='margin-left: 50px'><div  style=\"margin-top:7px\" class=\"forum-icon\"><i class=\"fa fa-shield\"></i></div><h2>"+data[i].vname+"</h2></div><div style=\"margin-top: 30px;\" class=\"col-sm-1 forum-info\"><span  class=\"views-number\">"+data[i].vdiscount+"</span></div><div style=\"margin-top: 21px;\" class=\"col-sm-1 forum-info\"><span  class=\"views-number\"><button type=\"button\" onclick='javascript:ud("+data[i].id+")'class=\"btn btn-primary\">修改</button></span></div>");
                }
        });
        });
        var id;
        function ud(ids){
            id=ids

            $.post('${pageContext.request.contextPath}/vip/getIds',{id:id},function(data){
                $("#Div2").modal('show');
                $("#Div2").on('shown.bs.modal',function(e){
                    $("[name=vname]").val(data.vname);
                    $("[name=vdiscount]").val(data.vdiscount);
                })
            })
        }

        function doupd() {
            var vname=$("#Div2 [name=vname]").val();
            var vdiscount=$("#Div2 [name=vdiscount]").val();

            $.post('${pageContext.request.contextPath}/vip/updatehys',{"id":id,'vname':vname,'vdiscount':vdiscount},function(data){
                if(data>0){
                    alert("修改成功");
                    $("#Div2").modal('hide');
                }

            })
        }
    </script>

</head>

<%--修改模态框--%>
<div class="modal fade" id="Div2">
    <div class="modal-dialog" >
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">修改会员信息</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" method="post" >
                    <div class="form-group">
                        <label for="title" class="col-sm-2 control-label">等级名称:</label>
                        <div class="col-sm-10">
                            <input  type="text" name="vname" class="form-control" id="title"  placeholder="等级名称">
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="title" class="col-sm-2 control-label">折扣:</label>
                        <div class="col-sm-10">
                            <input  type="text" name="vdiscount" class="form-control" &lt;%&ndash;id="title"&ndash;%&gt; placeholder="等级名称">
                        </div>
                    </div>








                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary"  onclick="doupd()" >修改</button>
                    </div>
                </form>
            </div>
        </div>
    </div>


</div>



<body class="gray-bg">
<div class="row">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="wrapper wrapper-content animated fadeInRight">

                    <div class="ibox-content m-b-sm border-bottom">
                        <div class="p-xs">
                            <div class="pull-left m-r-md">
                                <i class="fa fa-globe text-navy mid-icon"></i>
                            </div>
                            <h2>合作商列表</h2>

                        </div>
                    </div>


                    <div class="forum-item active">
                        <div  style="margin-left: 35px" id="52" class="row">
                            <div class="col-sm-9"><div  style="margin-top:7px" class="forum-icon"><i class="fa fa-calendar"></i></div><h1>合作商名称</h1></div><div style="margin-top: 30px;margin-left: 40px" class="col-sm-1 forum-info"><span  class="views-number">操作</span></div><div style="margin-top: 21px;" class="col-sm-1 forum-info"><span  class="views-number"></span></div>
                        </div>
                        <div id="520" class="row">
                            <div class="col-sm-9"><div  style="margin-top:7px" class="forum-icon"><i class="fa fa-shield"></i></div><h2>11111111111111</h2></div><div style="margin-top: 30px;" class="col-sm-1 forum-info"><span  class="views-number">140</span></div><div style="margin-top: 21px;" class="col-sm-1 forum-info"><span  class="views-number"><button type="button" onclick="doadd()"class="btn btn-primary">结账</button></span></div>
                        </div>
                    </div>


                </div>
            </div>
        </div>
    </div>
</div>
</div>
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/forum_main.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:48 GMT -->
</html>
